<?xml version='1.0' encoding='UTF-8' ?>
<!--

    Copyright (c) 2014, 2019 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Distribution License v. 1.0, which is available at
    http://www.eclipse.org/org/documents/edl-v10.php.

    SPDX-License-Identifier: BSD-3-Clause

-->

<!DOCTYPE HTML>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                template="/template.xhtml">

    <ui:define name="title">
        Login
    </ui:define>

    <ui:define name="body">

        <h:form>
            <h:panelGrid columns="2">
                <h:outputLabel value="#{bundle.Username_Label}" for="username" />
                <h:inputText id="username" value="#{userController.username}" />

                <h:outputLabel value="#{bundle.Password_Label}" for="password" />
                <h:inputSecret id="password" value="#{userController.password}" />

                <h:commandButton action="#{userController.login}" value="#{bundle.Login_label}" rendered="#{!userController.logged}" />
                <h:commandButton action="#{userController.logout}" value="#{bundle.Topbar_Logout_Label}" rendered="#{userController.logged}" />

            </h:panelGrid>

        </h:form>

    </ui:define>

</ui:composition>
